﻿using System;
/*
 Code Paragraph
 */
namespace ConsoleTest
{
    //个性化调试器的描述西西呢，描述信息包括在大括号对中间
    //可以使属性、字段或者方法的名字
    //[System.Diagnostics.DebuggerDisplay("{Description} 价格为：{m_price}")]
    [System.Diagnostics.DebuggerTypeProxy(typeof(ArticleProxy))]
    public class Article
    {
        //显示代理类
        //该attribute 可以应用于程序集、类、结构一般来讲用于显示的代理类内嵌入类或者结构中
        private class ArticleProxy
        {
            private Article m_Article;
            public ArticleProxy(Article article)
            {
                m_Article = article;
            }
            public string Price { get { return m_Article.m_price + "$"; } }
        }


        private decimal m_price;
        //应用于字段或者属性，告知调试器如何显示属性或字段
       // [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Collapsed)]      
        private string m_description;

        public string Description
        {
            get
            {
                return m_description;
            }
        }
        public Article(string Description, decimal Price)
        {
            m_description = Description;
            m_price = Price;


           
        }
    }

}